/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.chl.angholt.bookproject.wsdl;

import edu.chl.angholt.bookproject.db.entity.Author;
import edu.chl.angholt.bookproject.db.entity.Book;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;
import javax.jws.soap.SOAPBinding;

/**
 * Interface for Web Service to implement
 * @author Patric Peterson
 */
@WebService
@SOAPBinding(style= SOAPBinding.Style.RPC)
public interface View1 {

  
    /**
     * retrieve a book by id from DB
     * @param id The id of the book.
     * @return  The book in question or null if nothing.
     */
    @WebMethod(operationName = "getBookById")
    public Book getBookById(@WebParam(name = "id") Long id);
    
    /**
     * retrieve a author by id from DB
     * @param id The id of the author.
     * @return  The author in question or null if nothing.
     */
    @WebMethod(operationName = "getAuthorById")
    public Author getAuthorById(@WebParam(name = "id") Long id);
    
    /**
     * retrieve a author by name from DB
     * @param name The name of the author.
     * @return  The author in question or null if nothing.
     */
    @WebMethod(operationName="getAuthorByName")
    public Author getAuthorByName(@WebParam(name = "name") String name);
    
    /**
     * retrieve a book by title from DB
     * @param title The title of the author.
     * @return  The book in question or null if nothing.
     */
    @WebMethod(operationName="getBookByTitle")
    public Book getBookByTitle(@WebParam(name="title") String title);
}
